package com.app.service.devuser;

import com.app.dao.devuser.DevUserMapper;
import com.app.entity.DevUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @Author L
 * @Date 2021/4/2 11:09
 */
@Service
public class DevUserServiceImpl implements DevUserService {

    @Autowired
    private DevUserMapper devUserMapper;
    /**
     * 登录
     *
     * @param devCode
     * @param devPassword
     * @return
     */
    @Override
    public DevUser getLogin(String devCode, String devPassword) throws Exception {
        DevUser user = devUserMapper.login(devCode,devPassword);
        if (user != null){
            if (!user.getDevPassword().equals(devPassword)){
                user = null;
            }
        }
        return user;
    }
}
